package com.boat.ai.util;

import io.quarkus.hibernate.orm.PersistenceUnitExtension;
import org.hibernate.resource.jdbc.spi.StatementInspector;

@PersistenceUnitExtension
public class JpaInterceptor implements StatementInspector {
    @Override
    public String inspect(String sql) {
        System.out.println("sql:" + sql);
        // 正则替换表名/字段名为业务语义化名称
        return sql.replace("user0_", "用户表")
                 .replace("id1_1_", "用户ID");
    }
}
